<?php 
/* SVN FILE: $Id$ */
/* Address Test cases generated on: 2008-10-28 14:10:09 : 1225200969*/
App::import('Model', 'Address');

class TestAddress extends Address {
	var $cacheSources = false;
	var $useDbConfig  = 'test_suite';
}

class AddressTestCase extends CakeTestCase {
	var $Address = null;
	var $fixtures = array('app.address', 'app.user', 'app.order');

	function start() {
		parent::start();
		$this->Address = new TestAddress();
	}

	function testAddressInstance() {
		$this->assertTrue(is_a($this->Address, 'Address'));
	}

	function testAddressFind() {
		$this->Address->recursive = -1;
		$results = $this->Address->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Address' => array(
			'id'  => 1,
			'country'  => 'Lorem ipsum dolor sit amet',
			'zipcode'  => 'Lorem ipsum dolor sit amet',
			'city'  => 'Lorem ipsum dolor sit amet',
			'location'  => 'Lorem ipsum dolor sit amet'
			));
		$this->assertEqual($results, $expected);
	}
}
?>